|
|
|
|
|
|
|
One other option available in a menu is a separator bar, a line that allows you to group different menu items together with a single menu item's sublevel list (see Figure 4.22). These bars break up a long list of menu items without creating submenus. |
|
|
|
|
|
|
|
|
Figure 4.22.
Separator bars allow you to group and organize menu
items at the same level. |
|
|
|
|
|
|
|
|
Adding a separator bar is a little tricky. You must place a hyphen (-) in the Caption property and enter a Name property for the item. I usually enter SepN for the Name property of a separator bar, where N is the number of the bar I just added. |
|
|
|
|
|
|
|
|
Note Although separator bars a great to use, don't try to add one to the top level of the menu. You can use them only in submenus. |
|
|
|
|
|
|
|
|
|
If you've been working with Windows applications for a while, you've probably noticed that you can access a menu item in several different ways. These are usually done by using a combination of keystrokes. You can include two different types of access in your menu: hotkeys and shortcuts. |
|
|
|
|
|
|
|
|
Hotkeys are something you already know about and use, probably without thinking about it. A hotkey is identified by an underscore beneath the letter in the item's caption (for example, the E in Edit). To create a hotkey, place an ampersand (&) in the Caption property immediately before the letter you want as the hotkey. For the File menu item, the value of the Caption property would be &File. Hotkeys can be used for any item in your menu, including the top-level menu items. |
|
|
|
|
|
|
|
|
Note At any given level of a menu, only one unique value can be used as a hotkey. For example, the Visual Basic menu has File and Format at the same top-level. If you look closely at them, you'll see that the File menu item has |
|
|
|
|
|
|